cmake_minimum_required(VERSION 3.5)

project(imGUI LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(EXECUTABLE_SOURCES
    src/main.cpp
    src/imgui.cpp
    src/imgui_impl_sdl2.cpp
    src/imgui_impl_opengl2.cpp
    src/imgui_draw.cpp
    src/imgui_tables.cpp
    src/imgui_widgets.cpp
    src/imgui_demo.cpp
    include/imconfig.h
    include/imgui_impl_opengl2.h
    include/imgui_impl_sdl2.h
    include/imgui.h
    include/imgui_internal.h
    include/imstb_textedit.h
    include/imstb_rectpack.h
    include/imstb_truetype.h
)

find_package(SDL2 REQUIRED)
find_package(OpenGL REQUIRED)

include_directories(${OPENGL_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)



add_executable(imGUI ${EXECUTABLE_SOURCES})
target_link_libraries(imGUI ${OPENGL_LIBRARIES} ${SDL2_LIBRARIES})

install(TARGETS imGUI LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})


